package com.zte.util;

import com.alibaba.fastjson.JSON;
import com.zte.sys.login.model.LUsers;


import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;

public class WebSocketCustomEncoding implements Encoder.Text<LUsers> {
    @Override
    public String encode(LUsers user) {
        assert user!=null;
        return JSON.toJSONString(user);
    }

    @Override
    public void init(EndpointConfig endpointConfig) {

    }

    @Override
    public void destroy() {

    }
}

